Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KIC: Install buildkit package for use with containerd #9646

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Nov 9, 2020

For #9640

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 9, 2020
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2020
@@ -106,6 +106,12 @@ RUN sh -c "echo 'deb https://download.docker.com/linux/ubuntu focal stable' > /e
apt-key add - < docker.key && \
clean-install docker-ce docker-ce-cli containerd.io

# install buildkit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the comment to mention why we're pulling from this repo as opposed to an official one? It seems suspect.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no official one yet, and I haven't made the request yet...

It's built from https://github.com/afbjorklund/buildkit/tree/debian

Basically I copied the ubuntu packaging for "runc", for "buildkit"

Probably should upload the .dsc and the tarballs to bintray.com ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #9552

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a similar hack for podman

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really need to be dpkg?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have to be, no. We just preferred using regular system packages, and getting all the software from one place.
But since we moved from ubuntu.com to docker.com for runc/containerd/dockerd - we can get buildkit from github.com

At least until there is an official package available.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adopted the containerd installation script from kind, and adopted to minor quirks in the buildkit release.

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Nov 12, 2020

I asked the question about official .deb packages in moby/buildkit#1794

But it only has static executables for now, could switch to those I guess.

https://github.com/moby/buildkit/releases/tag/v0.7.2

bin/
bin/buildctl
bin/buildkit-runc
bin/buildkitd

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 18, 2020
Copy link

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple suggestions around the dockerfile.

&& curl -sSL --retry 5 --output /tmp/buildkit.tgz "${BUILDKIT_BASE_URL}/buildkit-${BUILDKIT_VERSION}.linux-${ARCH}.tar.gz" \
&& tar -C /usr/local -xzvf /tmp/buildkit.tgz \
&& rm -rf /tmp/buildkit.tgz \
&& chmod 755 /usr/local/bin/buildctl \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to shorten this, we could chmod all three files in one command:

chmod 755 /usr/local/bin/build*

@@ -21,6 +21,8 @@
# for a kubernetes node image, it doesn't contain much we don't need
FROM ubuntu:focal-20200925

ARG BUILDKIT_VERSION="v0.7.2"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think it would help readability to run this line right before we install buildkit, so it's easy to see everything at once

@medyagh medyagh merged commit f32eb7c into kubernetes:master Nov 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, medyagh, priyawadhwa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [afbjorklund,medyagh,priyawadhwa]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants